import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

import Dog from '../views/Dog.vue'
import Cat from '../views/Cat.vue'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    redirect: '/dog'
  },
  {
    path: '/dog',
    component: Dog
  },
  {
    path: '/cat',
    component: Cat
  }
]
const router = createRouter({
  history: createWebHistory((window as any).__POWERED_BY_QIANKUN__ ? '/mirco-app3' : '/'),
  routes
})

export default router